using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using DemoSoft.Domain.Entity;
using DemoSoft.Infrastructure.Persistence.Configuration.Base;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;

namespace DemoSoft.Infrastructure.Persistence.Configuration
{
    public class 表名Configuration: BaseEntityConfiguration<表名>
    {
        public override void Configure(EntityTypeBuilder<表名> builder)
        {
            base.Configure(builder);

            //设置表名的方法
            builder.ToTable("自定义设置的表名");

            builder.Property(x => x.UserName).HasColumnName("username").HasMaxLength(200).HasColumnOrder(1);
            builder.Property(x => x.PassWord).HasColumnName("password").HasMaxLength(200).HasColumnOrder(2);
        }
    }
}